home *** CD-ROM | disk | FTP | other *** search
/ Programmer Plus 2007 / Programmer-Plus-2007.iso / Programming / Visual Basic new SourceCode and Projects / MP3 Player / frmfolder.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1999-12-17  |  2.8 KB  |  102 lines

  1. VERSION 5.00
  2. Begin VB.Form frmfolder 
  3.    BorderStyle     =   3  'Fixed Dialog
  4.    Caption         =   "Folder"
  5.    ClientHeight    =   3810
  6.    ClientLeft      =   45
  7.    ClientTop       =   330
  8.    ClientWidth     =   2205
  9.    Icon            =   "frmfolder.frx":0000
  10.    LinkTopic       =   "Form1"
  11.    MaxButton       =   0   'False
  12.    MinButton       =   0   'False
  13.    ScaleHeight     =   3810
  14.    ScaleWidth      =   2205
  15.    ShowInTaskbar   =   0   'False
  16.    StartUpPosition =   3  'Windows Default
  17.    Begin VB.DriveListBox Drive1 
  18.       Height          =   315
  19.       Left            =   0
  20.       TabIndex        =   4
  21.       Top             =   0
  22.       Width           =   2175
  23.    End
  24.    Begin VB.TextBox Text1 
  25.       Enabled         =   0   'False
  26.       Height          =   375
  27.       Left            =   0
  28.       TabIndex        =   3
  29.       Top             =   2760
  30.       Width           =   2175
  31.    End
  32.    Begin VB.CommandButton Command2 
  33.       Caption         =   "Set as Default"
  34.       Height          =   495
  35.       Left            =   1200
  36.       TabIndex        =   2
  37.       Top             =   3240
  38.       Width           =   855
  39.    End
  40.    Begin VB.CommandButton Command1 
  41.       Caption         =   "OK"
  42.       Height          =   495
  43.       Left            =   120
  44.       TabIndex        =   1
  45.       Top             =   3240
  46.       Width           =   855
  47.    End
  48.    Begin VB.DirListBox Dir1 
  49.       Height          =   2340
  50.       Left            =   0
  51.       TabIndex        =   0
  52.       Top             =   360
  53.       Width           =   2175
  54.    End
  55. Attribute VB_Name = "frmfolder"
  56. Attribute VB_GlobalNameSpace = False
  57. Attribute VB_Creatable = False
  58. Attribute VB_PredeclaredId = True
  59. Attribute VB_Exposed = False
  60. Private Sub Command1_Click()
  61. frmMain.File1.Path = Dir1.Path
  62. frmMain.lblPath.Caption = Dir1.Path
  63. frmMain.lblTotal.Caption = "Total number of mp3's: " & frmMain.File1.ListCount
  64. Unload Me
  65. frmMain.Show
  66. End Sub
  67. Private Sub Command2_Click()
  68. Dim Ddefault As String
  69. ChDir App.Path
  70. frmMain.File1.Path = Dir1.Path
  71. Ddefault = Text1.Text
  72. Open App.Path & "\" & "default.dat" For Output As #1   ' Open file for output.
  73. Write #1, Ddefault
  74. Write #1,
  75. Close #1
  76. frmMain.Show
  77. frmMain.lblTotal.Caption = "Total number of mp3's: " & frmMain.File1.ListCount
  78. Unload Me
  79. frmMain.lblPath.Caption = Ddefault
  80. End Sub
  81. Private Sub Dir1_Change()
  82. On Error Resume Next
  83. Text1.Text = "" & Dir1.Path
  84. End Sub
  85. Private Sub Dir1_Click()
  86. On Error Resume Next
  87. Text1.Text = "" & Dir1.Path
  88. End Sub
  89. Private Sub Drive1_Change()
  90. On Error Resume Next
  91. Dir1.Path = Drive1.Drive
  92. End Sub
  93. Private Sub Form_Load()
  94. On Error Resume Next
  95. Open App.Path & "\" & "default.Dat" For Input Access Read As #1
  96. Input #1, Ddefault
  97. Dir1.Path = Ddefault
  98. Drive1.Drive = Dir1.Path
  99. Text1.Text = "" & Dir1.Path
  100. Close #1
  101. End Sub
  102.